﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using ArlesInterfaces.Render;

namespace Arles.src.controller.Commands
{
    class MultiSampleTypeCommand : Command<IRender>
    {

        MultiSampleType newType;
        MultiSampleType previousType;

        public MultiSampleTypeCommand(IRender render, MultiSampleType newType)
            : base(render, "RenderOptions")
        {
            this.newType = newType;
        }

        public override void Execute()
        {
            previousType = receiver.RenderMultiSampleType;
            receiver.RenderMultiSampleType = newType;
        }

        public override void Undo()
        {
            receiver.RenderMultiSampleType = previousType;
        }

        public override string toString()
        {
            return newType.ToString();
        }
    }
}
